package guda.mrpc.core.codec;

/**
 * Created by well on 17/6/3.
 */
public class MsgHeader {

    /** 协议头长度 */
    public static final int HEAD_LENGTH = 8;
    /** Magic */
    public static final short MAGIC = (short) 0xbabe;

    /** Message type: */
    public static final short REQUEST                    = 0x01;     // Request
    public static final short RESPONSE                   = 0x02;     // Response
    public static final short ACK                        = 0x03;     // Acknowledge
    public static final short HEARTBEAT                  = 0x04;     // Heartbeat

    private short msgType;
    private int bodyLength;

    public short getMsgType() {
        return msgType;
    }

    public void setMsgType(short msgType) {
        this.msgType = msgType;
    }

    public int getBodyLength() {
        return bodyLength;
    }

    public void setBodyLength(int bodyLength) {
        this.bodyLength = bodyLength;
    }
}
